package com.jiot.controller.project;

import com.zg.cloud.BaseResponse;
import com.zg.cloud.CommonEnum;
import com.zg.cloud.annotation.RoleCheck;
import com.zg.cloud.annotation.TokenCheck;
import com.zg.cloud.service.ProjectFunctionalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author liling
 * @date 2020/11/19 16:11
 * @description
 **/
@RestController
@RequestMapping("/device/project/functional")
@Api(value = "职能端项目模块")
public class ProjectFunctionalController {

    @Resource
    private ProjectFunctionalService projectFunctionalService;

    @RoleCheck({CommonEnum.Role.FUNCTIONAL})
    @PostMapping("/project/count")
    @TokenCheck
    @ApiOperation(value = "项目数量", notes = "device")
    public BaseResponse projectCount() {
        return new BaseResponse(projectFunctionalService.projectCount());
    }
}
